<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
           <div class="register">
             <input type="password" class="ipt">
             <p class="message">请输入6-16位密码</p>
           </div>
           <script>
               $(function()
               {
                $(".ipt").bind("blur",function()
                {
                    var l= $(".ipt").val().length;
                    if(l>=6&&l<=16)
                    {
                        $(".message").html("你输入的正确")

                    }
                    else 
                    {
                        $(".message").html("你输入的错误")

                    }
                })     
    
               })
           </script>
</body>
</html>